
"""
步骤
    1 导入模块
    import random
    2 使用这个模块功能
    random.randint()
"""
import random
# 1 出拳
# 玩家
player = int(input('玩家请出拳：0--石头；1--剪刀；2--布；'))
# 电脑
computer = random.randint(0,2)
print(f'电脑请出拳：{computer}')

#2 判断输赢
if (player ==0) and (computer == 1) or (player ==1) and (computer == 2) or (player ==2) and (computer == 0) :
    print('玩家获胜！')
elif player == computer:
    print('平局！')
else:
    print('电脑获胜！')